﻿/************************************************************************************
* Copyright (c) 2019 All Rights Reserved.
*命名空间：Separate.Model
*文件名： EmptyTrayGather
*创建人： Liebeskind
*创建时间：2019/6/17 16:25:23
*描述
*=====================================================================
*修改标记
*修改时间：2019/6/17 16:25:23
*修改人：Liebeskind
*描述：
************************************************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Commonality.Model.Tray;

namespace Separate.Model.EmptyTrayGather
{
    /// <summary>
    /// 空tray收集穴位映射
    /// </summary>
    public static class EmptyTrayMap
    {
        public static TrayModel Storehouse1 = TrayModel.NULL;
        public static TrayModel Storehouse2 = TrayModel.NULL;
        public static TrayModel Storehouse3 = TrayModel.NULL;
        public static TrayModel Storehouse4 = TrayModel.NULL;
        public static TrayModel Storehouse5 = TrayModel.NULL;
        public static TrayModel Storehouse6 = TrayModel.NULL;
    }
    /// <summary>
    /// 空Tray收集机类
    /// </summary>
    public static class EmptyTrayClass
    {
        /// <summary>
        /// 搜索Model对应仓位
        /// 1-6:对应仓位;7:收索无对应仓位
        /// </summary>
        /// <param name="trayModel">Model</param>
        /// <returns>1-6:对应仓位;7:收索无对应仓位</returns>
        public static short EmptyTrayToStorehouse(TrayModel trayModel)
        {
            if (EmptyTrayMap.Storehouse1 == trayModel)
            {
                return 1;
            }
            else if (EmptyTrayMap.Storehouse2 == trayModel)
            {
                return 2;
            }
            else if (EmptyTrayMap.Storehouse3 == trayModel)
            {
                return 3;
            }
            else if (EmptyTrayMap.Storehouse4 == trayModel)
            {
                return 4;
            }
            else if (EmptyTrayMap.Storehouse5 == trayModel)
            {
                return 5;
            }
            else if (EmptyTrayMap.Storehouse6 == trayModel)
            {
                return 6;
            }         
            return 7;
        }
    }



}
